<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>My JSP 'hisbuylist.jsp' starting page</title>
    
	<link href="../css/main.css" rel="stylesheet" type="text/css" media="all">
		<style>
#customers
{	text-align:center;
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	width:95%;
	border-collapse:collapse;
}
#customers td
{	
	font-size:1em;
	border:1px solid #98bf21;
	padding:2px 2px 2px 2px;
}
#customers th 
{   
	font-size:2em;
	padding-top:5px;
	padding-bottom:5px;
	background-color:#A7C942;
	color:#ffffff;
}
#customers tr.alt td 
{
	color:#000000;
	background-color:#EAF2D3;
}
</style>

  </head>
  
  <body>
    <%@include file="header.jsp" %>
    <c:if test="${empty(buylist.itemmap) }">
		<span style="left:45%;top:50%;position:absolute; font-size: 1.8em;">订单记录为空</span>  
		</c:if>
		
		<c:if test="${!empty(buylist.itemmap) }">
    <table id="customers">
    <tr >
    	<th>书名</th>
    	<th>图片</th>
     	<th>订单编号</th>
     	<th>购买数量</th>
      	<th>订单价格</th>
      	<th>购买时间</th>
    	
    </tr>
    <c:forEach var="entry" items="${buylist.itemmap }">
     <tr class="alt">
    	<td>${entry.value.bname }</td>
    	<td><img alt="" src="${pageContext.request.contextPath }/img/${entry.value.bsrc }"></td>
     	<td>${entry.value.orderNum }</td>
     	<td>${entry.value.buyNum }</td>
      	<td>${entry.value.orderPrice }
      	
      	</td>
      	<td>${entry.value.buyTime }</td>
    	
    </tr>
    
    </c:forEach>
    
    </table>
    </c:if>
    
  </body>
</html>
